{extend name="common:base" /}

{block name="page_title"}{$controllerName}添加{/block}

{block name="content"}
<div class="box">
    <div class="box-header with-border"></div>
    <form class="form-horizontal ajaxForm3" name="form0" method="post" action="{:url('')}">
        <input type="hidden" name="id" value="0">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label"> 所属用户组： </label>
                <div class="col-sm-10">
                    <select name="group_id" class="form-control col-sm-5" required>
                        <option value="">请选择所属用户组</option>
                        {foreach name="authGroupList" item="v"}
                        <option value="{$v.id}">{$v.title}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            {volist name="formFields" id="v"}
            {switch $v['type']}
            {case text}
            <div class="form-group">
                <label class="col-sm-2 control-label">{$v['text']}</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="{$v['name']}" placeholder="{$v['text']}">
                </div>
            </div>
            {/case}
            {case password}
            <div class="form-group">
                <label class="col-sm-2 control-label">{$v['text']}</label>
                <div class="col-sm-10">
                    <input type="password" class="form-control" name="{$v['name']}" placeholder="{$v['text']}">
                </div>
            </div>
            {/case}
            {case radio}
            <div class="form-group">
                <label class="col-sm-2 control-label">{$v['text']}</label>
                <div class="col-sm-10">
                    <input type="radio" class="form-control" name="{$v['name']}" placeholder="{$v['text']}">
                </div>
            </div>
            {/case}
            {/switch}
            {/volist}
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <div class="row">
                <div class="col-xs-2"></div>
                <div class="col-xs-10">
                    <button type="submit" class="btn btn-info">提交</button>
                    <button type="submit" class="btn btn-default">返回</button>
                </div>
            </div>
        </div>
        <!-- /.box-footer -->
    </form>
</div>
{/block}

{block name="script"}
{/block}